
export var Tables = {
    user: 'tinykeys',
    tinypic: 'tinypics'
}

export interface ifKeepKeyUnit {
    count: number,
    key: string,
    database:string,
    change: (n: number) => Promise<any>;
}

export interface ifKeepImageUnit {
    tinyMd5: string,
    srcmd5: string,
    time: number,
    name: string,
    pic: Buffer,
    database:string,
    save: (key: string, n: any, ...args: any) => Promise<any>;
    removeSelf: () => Promise<any>;
}

export interface ifBase {
    init(...args: string[]): Promise<boolean>;
    // getPressKey(): Promise<ifKeepKeyUnit>;
    getPic(f: any): Promise<ifKeepImageUnit | undefined>;
    inserPic(f: any): Promise<any>;
    freshAllDB(): Promise<any>;
}